//index.js
//获取应用实例
var app = getApp();
Page({
  data: {
    webUrl: ''
  },
  //下拉刷新
  onPullDownRefresh: function () {
    console.log("onPullDownRefresh");
    this.onLoad();
  },
  revMsg: function (e) {
    console.log("udexrevMsg", e);
  },
  onShow: function () {
    var reload = app.getPageData("user/index", "reload");
    if (reload == 1) {
      this.setData({ webUrl: app.getUrl("/mall/pages/renderPage", { page: 'pages/user/index', time: new Date() }) });
      app.setPageData("user/index", { reload: 0 });
    }
  },

  onLoad: function () {
    var that = this;
    var shop_info =   wx.getStorageSync('shop_info');
    app.getUserInfo(function (userInfo) {
      that.setData({ webUrl: app.getUrl("/mall-admin/mall_order/statistics", { shop_id: shop_info.id}) });
    })
  }
})
